# -*- coding: utf-8 -*-
# @Author: gengxd
# @Time:   2020-6-22 17:28
# @File:   settings



# Mail settings
import os

# 设置邮件域名、发件人、邮箱授权码、收件人
MAILHOST = "smtp.office365.com"
MAILHOSTPORT = 587
SENDER = "xgeng@appen.com"
MAILPASS = "Test@84.,!@#.,"
RECEIVERS = ["gengxd@foxmail.com","xgeng@appen.com"]

# 设置邮件头部内容
# 邮件标题
MAILSUBJECT = "Appen Code CICD Release"

# 附件路径
ATTAPATH = os.path.abspath("/work")
ATTAFILE = ['release.txt',]
PICNAME = '15.jpg'


# 邮件正文内容
# MAILBODY = """
# <html>
#     <body>
#         <p>Hi Rick:</p>
#         <p></p>
#         <p></p>
#         <p>&nbsp;&nbsp;&nbsp;&nbsp;Appen CICD Release Status Mail,Please Take a Look！</p>
#     </body>
# </html>
# """

MAILBODY = ""

# 设置邮件服务器认证方式
# MAILAUTH = "plain"  # 明文认证，即邮件服务器通过标注25端口提供邮件发送认证
MAILAUTH = "ssl"   # tls加密认证

# 设置发送邮件类型：纯文本(text)、HTML、带附件、HTML+图片
MAILTYPE = "text"
# MAILTYPE = "text|HTML|ATTA|HTMLPIC"
# MAILTYPE = "ATTA"

# 邮件正文文本格式 (纯文本:plain,HTML页面:html,)
MAILCONTENTFMT = "plain"

# 设置邮件编码格式
MAILCONTENTCODE = "utf-8"
ATTACHCODE = "gbk"


# Database settings
DBHOST = 'db_ipaddr'
DBPORT = 3309
DBUSER = 'dbuser'
DBPASS = 'dbpassword'
DBNAME = 'dbname'
CHARSET = 'utf8'
